package com.breakfast.fun.data.entity.user.order;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by yukai on 16/9/26.
 */

public class OrderDetailData {

    private int id;
    private String orderTime;
    private String orderNo;
    private double totalPrice;
    private double payPrice;
    private double freePrice;
    private double payFree;
    private int quantity;
    private String payType;
    private int refundState;
    private int state;
    private int payState;
    private String consignee;
    private String userMobile;
    private String detail;
    private String sendTime;
    private String remark;
    private int parentId;
    private int isMuti;
    private String activityName;
    private String shopName;
    private int isPackage;
    private OrderComment comment;
    /**
     * id : 33575
     * orderId : 57029
     * orderNo : F201609211815365407
     * productId : 412
     * productPrice : 9.0
     * productCount : 1
     * productName : 小笼包（8个）+三黑强肾豆浆
     * free : 0.0
     * shopId : 28
     * categoryId : 218
     * categoryName : A44
     * productImage : http://static.52letsgo.cn//product_image/2/11/44c2a75d-8_-1494321966.jpg
     * totalPrice : 9.0
     * shopName : 粗粮兄弟
     * sendDate : 2016-09-22
     */

    private List<OrderDetailProduct> goods;

    public static OrderDetailData objectFromData(String str) {

        return new Gson().fromJson(str, OrderDetailData.class);
    }

    public static List<OrderDetailData> arrayDataBeanFromData(String str) {

        Type listType = new TypeToken<ArrayList<OrderDetailData>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(String orderTime) {
        this.orderTime = orderTime;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public double getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(double totalPrice) {
        this.totalPrice = totalPrice;
    }

    public double getPayPrice() {
        return payPrice;
    }

    public void setPayPrice(double payPrice) {
        this.payPrice = payPrice;
    }

    public double getFreePrice() {
        return freePrice;
    }

    public void setFreePrice(double freePrice) {
        this.freePrice = freePrice;
    }

    public double getPayFree() {
        return payFree;
    }

    public void setPayFree(double payFree) {
        this.payFree = payFree;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    public int getRefundState() {
        return refundState;
    }

    public void setRefundState(int refundState) {
        this.refundState = refundState;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public int getPayState() {
        return payState;
    }

    public void setPayState(int payState) {
        this.payState = payState;
    }

    public String getConsignee() {
        return consignee;
    }

    public void setConsignee(String consignee) {
        this.consignee = consignee;
    }

    public String getUserMobile() {
        return userMobile;
    }

    public void setUserMobile(String userMobile) {
        this.userMobile = userMobile;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public String getSendTime() {
        return sendTime;
    }

    public void setSendTime(String sendTime) {
        this.sendTime = sendTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public int getParentId() {
        return parentId;
    }

    public void setParentId(int parentId) {
        this.parentId = parentId;
    }

    public int getIsMuti() {
        return isMuti;
    }

    public void setIsMuti(int isMuti) {
        this.isMuti = isMuti;
    }

    public String getActivityName() {
        return activityName;
    }

    public void setActivityName(String activityName) {
        this.activityName = activityName;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public int getIsPackage() {
        return isPackage;
    }

    public void setIsPackage(int isPackage) {
        this.isPackage = isPackage;
    }

    public List<OrderDetailProduct> getGoods() {
        return goods;
    }

    public void setGoods(List<OrderDetailProduct> goods) {
        this.goods = goods;
    }

    public OrderComment getComment() {
        return comment;
    }

    public void setComment(OrderComment comment) {
        this.comment = comment;
    }
}
